Fix issue when `basestring` does not exist on py3k - refs #6