Prefer pkg-config if available

pkg-config is a cross-distro interface for build systems to
get the correct libs/cflags of a library you want to build against.
In case it is not existent, we fall back to the previous logic.