Add POSIX compatible case insensitive compare

Needed for libcoap