Invariance Discovery for Systematic Generalization in Reinforcement Learning