basestring Python 3 fix