Use pkg-config to get compiler and linker options for libraries.

This fixes vokoscreen ftbfs (failed to build from source) on Ubuntu 10.04 cause of old opencv library.