Fix Lua 5.1 detection on systems with old pkg-config

Should help with issue #75.
Depend on older version of SQLite3 libraries

Should help with issue #75.