Revert "Fix errors in configure.in"

This reverts commit 24097fc8b6a836087bb8a22e3987341376797f71.
Re-introduce patched ./configure script