Cameron faces party battle over EU referendum