The selective advantage of reaction norms for environmental tolerance