Fix configure.ac to avoid autoreconf errors, and update to latest config.sub and config.guess