support AMD, CommonJS and browser globals modules