Coercivity and nanostructure in magnetic spinel Mg(Mn,Fe)2O4