Effects of microstructure on shock propagation in foams