This is necessary for Flatpak, because Yocto messes with the /usr/bin/*-config files, and really wants everyone to use pkgconfig. A fallback is kept to build on platforms which don't have pkgconfig for those libraries.