Fix for issue when using in plain old javascript from a browser.
Merge pull request #2 from vitch/patch-1

Fix for issue when using in plain old javascript from a browser.