improve compile for msys+mingw
add sqlite3 library for mingw
fix url and sqlite3 bug