Support CommonJS style.

This change enables to use this library in CommonJS style. So we can use this in browserify as the style.