Merge in the Linux code, so that hopefully this now compiles on both linux and windows