makes AMD and CommonJS compatible