Changes to work on linux and windows