Add a patch from anstein on Github for IPv6 support.
Fix the previous commit which broke the ability to create connections to
a backend on BSD platforms (at least OS X and NetBSD).
Fix a few minor compile problems seen with NetBSD.
Misc scons configuration fixes.
Merge remote-tracking branch 'cmyth/master'