Fix AttributeError with requests < 0.13.3