Redmine #3048: Fix configure --with-libacl.

Apparently AC_CHECK_HEADERS runs the third argument if *any* of the
headers are not found, instead of if none of them are found, so that
logic needs to be outside the loop.