fixes to build on linux