Compilation notes and fixes for Windows