Fix compilation on FreeBSD and OSX from f15d52f

HOST_NAME_MAX is recommended by POSIX, but not required to be defined. 255
is generally a safe number to assume in that case and matches upstream's
behavior.