Fix libx264 configure check to use pkg-config if available.