Compilation fixes for WIN32