Supports AMD and CommonJS