Accurate determination of the complex refractive index of scattering materials by THz time-domain spectroscopy