Handle removal of WSGIServerException in Django 1.6

``WSGIServerException`` was replaced with ``socket.error`` in Django 1.6.
See https://github.com/django/django/commit/56201fe5a85ead96f00d8ad2eda5cfd2bc4cb4b0

This patch fixes the resulting ImportError and preserves compatibility with older Django versions.