Fixes for compiling on Linux