Changes to compile under Windows (thanks Fade)