Fix some issues while compiling in Windows