A few fixes to get it compiling on linux.