Influence of Crystal Structure of Bulk Phase on the Stability of Nanoscale Phases: Investigation on MgH2 Derived Nanostructures