port to FreeBSD 10 & OSX 10.9.5

I have verified that this works on FreeBSD 10.  I left it running overnight with no issues.

On OS X I can build it, but it is failing with errno 65 'no route to host'? even though it actually works.
I can route around the issue by setting errno=0 just before the reconnect checks in the two clients.
I've done some instrumentation to try to discover which syscall is setting errno, but I've run out of time to work on this today.

The problem seems to be that this is a GNU Makefile, and gmake seems to install a default of g++ for CXX. [on FreeBSD the default compiler is now clang/llvm].  This should probably be in a platform test, but I'm not a makefile wizard and I was admittedly flailing here.