Robust Visual Imitation Learning with Inverse Dynamics Representations