configure: inverted the order of the libraries liked with almost
this solution should be more general