Starting from LLVM 14 we are using HWLOC APIs from newer version, per
https://github.com/llvm/llvm-project/issues/54951, but our CMake check doesn't
include that part. Unfortunately HWLOC doesn't provide a proper CMake module for
find_package. We have to check if specific struct member exists before we use
that.
Fix #54951.
Move this below the check_struct_has_member call so the same hwloc.h header is used as the one in the check_include_file() call.