Fix configure.ac patch to be more general