Changes required to build trex on Mac OS X

Modifications required to get Trex to build on Mac OS X using homebrew and clang.