X-ray diffraction study of the structural transformation in TiH2