Understanding the influences of Mg doping on the physical properties of SrMoO3 perovskite