Fix Windows build errors from refactoring