fix basestring on python3