Use -ldl only on linux