Add a property for getting anchor2 from joints. Fix a bug in automatic AMotor creation.