ci: expand lib64 workaround to more Linux distros

Refs: #5299
Change-Id: I0b40cd2b463b92d3b97d08e9edabab673fb13e57
diff --git a/.jenkins.d/40-headers-check.sh b/.jenkins.d/40-headers-check.sh
index 28cc98f..5e543dc 100755
--- a/.jenkins.d/40-headers-check.sh
+++ b/.jenkins.d/40-headers-check.sh
@@ -11,7 +11,7 @@
   exit 0
 fi
 
-if [[ $ID_LIKE == *fedora* ]]; then
+if [[ $ID_LIKE == *linux* && -d /usr/local/lib64/pkgconfig ]]; then
   export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig
 fi