B1-B2 transition in shock-compressed MgO