Enable popen for FreeBSD as well.
Fix pkgconfig function typo.