Mondelēz International and Hershey are relying on innovation and sourcing diversification to shield themselves from volatility.