build: Add optional pthread flag when detecting Crypto++

This commit also includes a small fix to support Python3

Change-Id: Ifa0c547bd872ab749745b5bdc778d4b3269bb87e
Refs: #1590