beautify code.
add support for AMD and browser (global window)
Merge branch 'master' of https://github.com/tlindig/indexed-map