Exit when pkg-config isn't found

We run pkg-config in a subshell, so our 'set -e' does not take effect
there. Explicitly error out if there was an error running pkg-config.