Fix #228: Uncaught [Filer Error] Your browser doesn't support IndexedDB or WebSQL.

This switches to use the `global` object from node, which browserify wires directly to `window` in a browser, see https://github.com/substack/browserify-handbook#global.  With this fix I'm able to get things working again.