MDL-57558 ldap: fix ldap_get_entries_moodle()