Fix build when both curl and ldap are disabled