S&P 500 heads toward worst losing streak in months as stocks slump