Update has-color.js

protect isTTY call when process.stdout == undefined
Merge pull request #8 from maxleiko/master

Update has-color.js