changes for supporting old version of python-requests used by ubuntu-precise