Fixes to the makefiles, uses the proper autoconf variable SQLITE_LIBS to build now