Adds check to useColors for ServerWorker 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`.