cpp: fix tests on windows (msys2 at least)