Electrochemical synthesis of nanoporous tungsten carbide and its application as electrocatalysts for photoelectrochemical cells.