Dynamical polarization effects in dissociative sticking of a diatomic molecule with energy loss to the substrate