Added "main" param to package.json
Added support for AMD and Node.JS environments