Tweaks for compiling on OSX

These are (almost!) enough to get Thrift compiling.