some fixes for build on linux