find_library: Search per-arch lib directories when compiling with sysroot

When using Gentoo Prefix on Debian, find_library for libm.so fails,
because it needs to locate the lib in $sysroot/usr/lib64/libm.so, i.e.
lib64/ not lib/.

To fix this, do not disable per-arch lib directories when a sysroot is
set.

Fixes: #26069
1 file changed