add support for mingw32
fix unit test compile error on mingw32