Hydrogenation of nitriles and imines for hydrogen storage