find PkgConfig before using pkg_check_modules

PC specific functions mustn't be used before including PkgConfig