Fixes to make it build on linux as well as windows