Make it compatible with newer versions of requests library.