Fix compilation for MacOSX and Oracle's JVM

Fixes https://github.com/zeromq/jzmq/issues/267