Dependence of microstructure of TiN coatings on their thickness