handle gzip response for older versions of ruby