"XML_Parser" in cmexpat is a typedef for void* while newer releases of expat seem to use struct XML_ParserStruct *XML_Parser. Add static_casts so that the build works with either variant.