Update has-color.js

protect isTTY call when process.stdout == undefined

By doing so, you prevent `Uncaught TypeError: Cannot read property 'isTTY' of undefined` from being thrown while using `chalk` with __browserify__ :)