Adds check to useColors for ServiceWorker context

When bundling `debug` using `browserify` the browser version is used, and the `useColors` check crashes when in a ServiceWorker, because `document`, `window` and `navigator` are all `undefined`.
Rather then special-casing `ServiceWorkerGlobalScope`, we should probably use `global`, `global.document` and `global.navigator`, which should work I would think.

What does `global` resolve to when you execute a browserified script as a ServiceWorker?