socks: fix build on FreeBSD

The fix should be sane on all UNIX-like systems, so there's
no ZMQ_HAVE_FREEBSD involved.  It's likely that other BSDs
stumble across this problem too.

***Please test this on Linux before merging.***