More robust configure scripts shell path patching.