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.
add explicit int64_t cast

OS X has trouble deciding between an int and int64_t in this case.
fix imagick compilation on OS X

Add explicit int64_t casts where needed. The reason we don't just change
(s)size_t types is to stay compatible with imagick's API function
signatures.
Merge remote-tracking branch 'danslo/osx-ssizet'
Merge remote-tracking branch 'demon/host_name_max'