added support for JS modules, based on CommonJS Modules 1.1.1