This solution was written for JPM 1.0.0.
It is also a proof-of-concept, and has not been thoroughly tested yet. Use at your own risk!
The Firefox module loader, by default, has all modules live in their own isolated world and don't share any global object. You can't monkey-patch default methods/the global object in one module of your extension, and have it be affected in another module of your extension.
Mozilla's JPM tool handily lets you use packages straight from NPM in your Firefox add-on, but the globals in the JS environment in an extension's main process are pretty barebones until you require anything. Globals that tons of NPM modules take for granted as being available - like setTimeout, XMLHttpRequest, even variables pointing to the global object like global or window arent there.