Apply patches to work with new autoconf versions

Patches sourced from yocto.