Add compatibility with REST Framework 2.4.

Circumvents https://github.com/tomchristie/django-rest-framework/issues/1809