Add tweaks to make things build on windows