Chemical order and magnetic properties in small Mx−2N2 nanoalloys