Fix configure ODBC logic

...and rewrite entire block for better clarity of purpose.

We might want to look more closely at the AX_LIB_ODBC macro as well.

This amends commit dfd591e9f52cdc71f3837e123db5bace9c5474b8.