Add UMD support
Fix AMD support
Fix closing function indent
Merge pull request #3 from JSteunou/issue-60

Issue 60