Relationship between the microstructure, composition, and thermoelectric properties of Mg2Sn thin films