Fix windows compiler errors