fix OS X build when using Oracle JDK