Import from gh/jx/crud.
Listen using M.on only if it exists.
This requires modm.
Define magic global variable M if it is undefined.