Structural and corrosion behaviour of stoichiometric and substoichiometric TiN thin films