Currently `debug` fails in a web worker, because `document` is not available. Background: https://github.com/pouchdb/pouchdb/issues/4612