Cleanups in configure.ac for libjvm detection.

Late requests for cleanups in https://reviews.apache.org/r/19487.