Effects of substrate temperature and substrate material on the structure of reactively sputtered TiN films