Changes to (mostly) build on Linux