Fix rigid compilation for Windows