Fix buffer_strcmp and add case insensitive compare functions.