Modified to build on windows