Fix the out-of-tree build
FreeBSD doesn't need a gethostname declaration