Use cbasestr for basestring
Fix embedding
Use compat pickle module
Use cstr instead of unicode