Only link the tests against -ldl on linux