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 `chalk` is being __browserified__ :)