Guard printing PKG_CONFIG_PATH in build.py

Bug: 176846220
Tag: #floss
Test: atest --host bluetooth_test_gd
Change-Id: Iba0c739a07bcfa7256ea624e2391d5cee016d2de
diff --git a/build.py b/build.py
index 1ece6ce..27332cf 100755
--- a/build.py
+++ b/build.py
@@ -288,7 +288,8 @@
             self._gn_default_output(),
         ]
 
-        print('DEBUG: PKG_CONFIG_PATH is', self.env['PKG_CONFIG_PATH'])
+        if 'PKG_CONFIG_PATH' in self.env:
+            print('DEBUG: PKG_CONFIG_PATH is', self.env['PKG_CONFIG_PATH'])
 
         self.run_command('configure', gn_args)