Fixes to compile on linux