CMake: test stripped library names when the detected lib fails