Revise CMake linux check to not trigger when cross-compiling.