Only link tests against -ldl on linux