yet another attempt to do robust winmat processing on windows