Compatibility fixes for scons using Python 3

Use print style compatible with Python 2/3.
Set text mode in popen so that textual regexps work.

Change-Id: I079587afd0cf6c896ff5adb5dda3f2bc1fdeff4a
diff --git a/tools/util.py b/tools/util.py
index bc8dcd1..9152584 100644
--- a/tools/util.py
+++ b/tools/util.py
@@ -87,7 +87,8 @@
   args += ['-E', '-dM', '-']
 
   # Instruct the compiler to dump all its preprocessor macros.
-  dump = subprocess.Popen(args, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
+  dump = subprocess.Popen(args, stdin=subprocess.PIPE, stdout=subprocess.PIPE,
+                          universal_newlines=True)
   out, _ = dump.communicate()
   return {
     # Extract the macro name as key and value as element.