Fixes to build for linux