Add support for AMD, commonjs and browser-only

Added a header to play nicely with commonjs, amd and classic window exports