Fix unittests not being run by "make test" on Windows.

Simply grabbed this code from KDReports, where it works.