Fix the Java API build on Mac OS X

Small fix to make compilation work again on Mac OS X. I trust this will also work on Linux?