Manually merged in changes from https://github.com/ruby-ldap/ruby-net-ldap/pull/88, so we have a working version.