add -lz flag to link properly