Improved the way we detect the perl object for an Net::LDAP::Entry object