Iraq president says militants funded from abroad