Fixed issues building on Windows