AMD, requirejs and commonjs compatibility
Merge pull request #11 from zaizhuang/amd

AMD, requirejs and commonjs compatibility