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

Instead of modifying os.environ

Refs: #5042
Change-Id: Ic39e871be1a6da027383a1a7d54be4f6611df15b
diff --git a/wscript b/wscript
index 84038c9..c87b2a8 100644
--- a/wscript
+++ b/wscript
@@ -27,9 +27,8 @@
 
     conf.env.WITH_TESTS = conf.options.with_tests
 
-    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')
+    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))
 
     boost_libs = ['system', 'program_options', 'filesystem']
     if conf.env.WITH_TESTS: