Update for requests version compatibility.

These patches make the chartbeat package compatible with all requests versions.