Fixes to make compiling work on Linux