Amorphous and nanocrystalline Mg2Si thin-film electrodes