Update jar.cmake

Invalid use of conditionals fixed.