g_sorcery/compatibility: basestring fix