Fix some compatible issues for windows.