Fix detection of MIME type in message_parse()