Make publishing contingent on JDK version