Some compile fixes for older versions of C++ on windows