Instead of another patch perhaps just build with zlib support ;)?