Fix linking to pthread and dl libraries on some Unix systems (needed for SQLite library) and remove instruction from Travis script to apt-get install SQLite.