ldap.c: Fix compilation warning

warning: comparison between signed and unsigned integer expressions