improve compile for msys+mingw
add sqlite3 library for mingw