Make contribute_to_class work with Django 1.5