Compile fixes for windows