compile fixes for Windows