fix supporting older versions of requests