Improve FFI pkg-config detection