Chemomechanical effect in ion-implanted magnesium oxide