Condensation of water vapor in rarefaction waves. I - Homogeneous nucleation