FindPkgConfig: Fix pkg_check_modules() search of packages from non-standard location.
During search of the library file pkg_check_modules() attempts to find it in last specified library path in ${_prefix}_LDFLAGS, that after dependency resolving contains path to standard location.
So in case when ${_prefix}_LDFLAGS has: "-L/prefix;-L/usr/local/lib;-llibrary_from_prefix;-ldependency"
library_from_prefix will not be found.
As solution need try to find the library in all paths preceding to the library.
Fixes: #16873 (closed)
Topic-rename: FindPkgConfig-fix-lib-search