Windows build

Fix a couple of #ifdef issues for Windows build