Use zlib.gzip instead of child_process.spawn("gzip")

If zlib module available, use it instead of child_process.spawn("gzip")