Fix warnings and errors on cygwin for sqlite3.c