make script backwards-compatible with requests 0.12

we use the script on debian wheezy that still uses an
old version of requests