Fix test failure when pkg.m4 is not found, only pkg-config.