Properly detects platform in CMake for VNav.