Update zsys.c

Add missing close
Merge pull request #768 from wysman/patch-1

Fix #766