Work-in-progress state of making statify work on MinGW

We still need some more work, but let me check this in
so that I won't forget.