Building Object-based Causal Programs for Human-like Generalization