Add CommonJS and AMD style module support

I need CommonJS module support and Web browser support by 1 source.