Properly handle the -M switch.