libxml2 2.12.0 added const to one of the arguments of the error
callback function, changing its signature. Check the libxml2 version
so the function definition uses the proper type to fix the build
breakage.
PR: 281612
Reported by: Daniel Engberg <diizzy@FreeBSD.org>