This has been broken at runtime since the update to OpenLDAP 2.6.2. ruby-ldap previously linked to libldap_r, but the OpenLDAP update removed libldap_r, and the code compiled without linking to any ldap library, breaking at runtime. Update WANTLIB while here.