The first-order structural transition in NiO at high pressure