adapt to MinGW on WIN 7.