Thermal diffusion in moderately dense gas mixtures and the pair-correlation function