Causal inference using invariant prediction: identification and confidence intervals