Some compile fixes on windows