Infrared spectroscopy and the structure of polytypic modifications of RM3(BO3)4 borates (R — Nd, Gd, Y; M — Al, Ga, Cr, Fe)