Added support of AMD and Node.js (via browserify) environments

I didn't create minified version.

I've tested it in browser and with require.js. Later I'll test in node.js with browserify.