Fix cmake code to handle mime types