Enhanced corrosion resistance of TiN prepared by plasma-based ion implantation