g_sorcery/backend: fix problems with unicode for python-2