Rotational excitation of interstellar OH molecules