Hydrogen Sorption Kinetics in MgH2 and TiH2 Thin Films