Fixes for compiling on linux