Don't write out ldap bind declarations if the values are nil

This makes this work with more LDAP setups
Merge branch 'COOK-2433'