The influence of porosity on the elastic response of homogeneous and structural composite media