Use runtest.c from libxml2 as a starting point. This finally allows us to run most of tests with CMake and Autotools VPATH builds.