workaround for incompatibilities with gunicorn >= 0.17.0
see esp. https://github.com/benoitc/gunicorn/commit/b7b51adf13e92044211b267ba07e3498585f219a