Fixes for building on linux