Various build fixes

These will have to be tested with the build scripts on all platforms
Same with these two, maybe contentious. We'll have to discuss why we use those and whether we still want them.