Fixes for building on Linux