[cmake] Check for realpath availability in CMake