another attempted fix for using zlib consistently across versions and platforms