Numerical method based on transfer function for eliminating water vapor noise from terahertz spectra