add gzip response handling for older versions of ruby