Mitigating scattering effects in THz-TDS measurements