adopted _sqlite_atoi64 from sqlite.c