Added #ifdefs and CMake logic for deciding when to use JIT