fix build on BSDs
Merge pull request #1 from ebfe/build-bsd

fix build on BSDs
disable colors if stdout is not a tty
Merge pull request #2 from ebfe/tty-color

disable colors if stdout is not a tty