Fix HTTP requests on Python 2.5.x.

Python 2.5.x doesn't understand that all HTTP 2xx status codes are
successful responses and not errors. This causes problems when using
Python 2.5 and services like GitHub, which may return 2xx codes.

This fix is not needed for Python 2.6+.

Fixes bug #3043