Example of using libmagic from C