reorder linkage of libs so that static linkage finds all the symbols we want