S&P 500 and Nasdaq futures inch higher after two days of gains for stocks