Adding Python3 basestring compatibility without changing basestring