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.
Merge pull request #1571 from kacfengine/configure_with_libacl

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