Adds check to useColors for ServerWorker conte

When bundling `debug` using `browserify` the browser version is used, and the `useColors` check crashes when in a ServiceWorker, since `document`, `window` and `navigator` are all `undefined`.