fix compile: add include of getopt.h
introduce macro HEATSHRINK_ERR() for mingw where err() is not available
fix open() for mingw
update gitignore