Learning Invariant Representations with Missing Data