Check LDAP username in case insensitive way

I spent over an hour trying to work out why I couldn't authenticate using my LDAP account (Microsoft Active Directory server) until I realised that I was using `tom` as my username but the LDAP server was returning `Tom`!