CMake: fix JAR package generation