fix module check so it behaves as intended

Commit 680c51f601998691d1b4e24273a7241ef5b449e0 broke PouchDB in the browser, `typeof` operator returns string and so its result will never be `=== undefined`.

NOTE: there's a ton of this brokenness in tests, but I'm assuming it's less harmful because tests get run from cmdline via node where `module` *is* defined.