Fix some linker errors by linking with more libs.
Fix some linker errors by linking with more libs.

tuulos/traildb,tuulos/traildb,tuulos/traildb,traildb/traildb,traildb/traildb,tuulos/traildb,traildb/traildb