S&P 500 closes higher as traders await payrolls report