Use string_types instead of basestring

... in order to get python 3 compatibility