assign to window object as well as exporting in AMD
documentation for AMD modules added to README.md