try adding -ldl to libs if standard openssl test fails (patch submitted upstream)