Fix the check for Ninja in the CMake build.