Removing Fabry-Pérot artifacts for electromagnetic homogenization of lossless and lossy dielectric composite based on scattering parameters