Formation and migration of cation defects in the perovskite oxide LaMnO3