In-situ study of Ni-Ti thin film growth on a TiN intermediate layer by X-ray diffraction