support loading in the browser

Thanks for this library!  I tried loading it in Chrome extension and saw errors, added this a la UMD (tho skipped the AMD part).  Tests all pass.