Structural changes upon lithium insertion in Ni0.5TiOPO4