Add CommonJS and AMD Compatibility