Internal Causal Mechanisms Robustly Predict Language Model Out-of-Distribution Behaviors