use zlib for writing BGF (new version 10) in writebgf.c