build: pass pkg_config_path to check_cfg() when looking for libndn-cxx

Instead of modifying os.environ

Refs: #5042
Change-Id: I805894942b9828176f7eb0442ea617a324398989
diff --git a/wscript b/wscript
index 6c65c50..e5740f4 100644
--- a/wscript
+++ b/wscript
@@ -15,10 +15,8 @@
     conf.load(['compiler_cxx', 'gnu_dirs',
                'default-compiler-flags'])
 
-    if 'PKG_CONFIG_PATH' not in os.environ:
-        os.environ['PKG_CONFIG_PATH'] = Utils.subst_vars('${LIBDIR}/pkgconfig', conf.env)
-    conf.check_cfg(package='libndn-cxx', args=['--cflags', '--libs'],
-                   uselib_store='NDN_CXX', mandatory=True)
+    conf.check_cfg(package='libndn-cxx', args=['--cflags', '--libs'], uselib_store='NDN_CXX',
+                   pkg_config_path=os.environ.get('PKG_CONFIG_PATH', '%s/pkgconfig' % conf.env.LIBDIR))
 
     conf.check_compiler_flags()