AMD, requirejs and commonjs compatibility