build: Add optional pthread flag when detecting Crypto++

This commit also includes a small fix to support Python3

Change-Id: Ifa0c547bd872ab749745b5bdc778d4b3269bb87e
Refs: #1590
diff --git a/.waf-tools/cryptopp.py b/.waf-tools/cryptopp.py
index bf92a3c..2f95504 100644
--- a/.waf-tools/cryptopp.py
+++ b/.waf-tools/cryptopp.py
@@ -60,9 +60,11 @@
     if not self.env['CXX']:
         self.fatal('Load a c++ compiler first, e.g., conf.load("compiler_cxx")')
 
-    var = kw.get('uselib_store','CRYPTOPP')
+    var = kw.get('uselib_store', 'CRYPTOPP')
     mandatory = kw.get('mandatory', True)
 
+    use = kw.get('use', 'PTHREAD')
+
     self.start_msg('Checking Crypto++ lib')
     (root, file) = self.__cryptopp_find_root_and_version_file(*k, **kw)
 
@@ -85,4 +87,5 @@
                          cxxflags="-I%s/include" % root,
                          linkflags="-L%s/lib" % root,
                          mandatory=mandatory,
+                         use=use,
                          uselib_store=var)