Elastic versus Alloying Effects in Mg-Based Hydride Films