Convert the mime type to lowercase without running into Turkish locale issue

@jroper thanks for catching!