zlib patch for DEBUG pre-processor

Patch as described on zlib:
https://github.com/madler/zlib/pull/80
Merge pull request #554 from danoli3/zlib_debug_fixes

zlib patch for DEBUG pre-processor