Add static library target.
Fix linking with sqlite3 and libx86ref.