Define basestring for Python 3