GCM python3 compatibility

GCM str encode/decode