Hydrogen generation by hydrolysis reaction of magnesium hydride