BUILD: Fix the build on OSX (htonll/ntohll)

htonll and ntohll were defined in 5b4dd683cb but on osx they are already
defined in sys/_endian.h. So, we check if they are defined before
declaring them.

[wt: no backport needed]
1 file changed