Fixed metaclass support in Python 3

Use `django.utils.six` to allow metaclass support in Python 2 and Python 3.