CheckIncludeFiles: Add CMAKE_REQUIRED_LIBRARIES
This is needed when cross compiling and the compiler requires a
specific linker different from the default, e.g., when cross compiling
from Darwin to Linux and passing -fuse-ld=lld
to clang.
Fixes: #9514 (closed)
Topic-rename: CheckIncludeFile-required-libs
Edited by Brad King