I have an XDM40 and have been told repeatedly, the mags are not interchangeable with the XD 
This is true. The M had the mag well opened up to be able to fit the larger capacity magazine. Nothing else could have been done with the exception of making a taller mag.