configure: fix licence check function