Substrate-dependent structure, microstructure, composition and properties of nanostructured TiN films