On the Importance of Exploration for Generalization in Reinforcement Learning