Carbothermal synthesis of titanium nitride