up to date libmagic implementation for ios