replace jmimemagic file-type detection with reflective Java-7 API