Fix encoding for b64 string to support python 3.2