libads/ldap.c: return an error instead of crashing when no realm is given