p2 tests: change order of libs: travis fails to link -ldl -lm