Republicans have a narrow lead weeks before midterms, polling shows