Learn what matters: cross-domain imitation learning with task-relevant embeddings