configure: improve last fix

 Let's avoid the "if a=$(cmd ...)" since:
 - unless being a shell expert, it's not obvious it's testing the exit code
   of cmd.
 - it's quite fragile, if you pipe cmd into a cmd2 you'll lose the
   exit code of cmd.

 Instead, we test the emptiness of the variable content afterwards

 Moreover, fix a filename test in the non-ocamlfind case