Stock futures inch higher after S&P 500 retreats from record