fixed ldap/ad integration, fixed build decl wrappers