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/.gitignore b/.gitignore
index 416246d..21772b9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,6 +6,7 @@
 
 # waf build system
 .waf-1*
+.waf3-*
 .lock*
 build/