Rotational line strengths in two- and three-photon transitions in diatomic molecules