Fixes for building on Windows machines