Fixed a few issues in configure.ac.

Review: https://reviews.apache.org/r/24734