Update lib.php

[Fix] Since some usernames from LDAP may be capitalized, comparing them to a lower-case string fails. To do a real comparison it is probably best to use case-insensitive usernames.