Only pass known libraries to pkg-config. Fixes #274.

This is yet untested. Also disables calling pkg-config on non-Posix systems.