Do not use the entire `CMAKE_SYSTEM_VERSION`, but rather the first two components only. Fixes: #19275