Fix for windows build

Fixes compilation errors under windows.