Scattering of a diatomic molecule by a stationary surface