Making fix of commit 299201fdef compatible with Mac OSX.
zlib is up to 1.2.8