Robust agents learn causal world models