Libmonkey: fix build and add test for mimetype