Use string_types instead of basestring

... in order to get python 3 compatibility
Otherwise, it's impossible to use django-crispy-forms with python 3

This is similar to pull request #310 but #310 can't pass CI because of other changes.