Use six.string_types for improved Python3 support