Effects of microstructure on the speed and attenuation of elastic waves in porous materials