fix some build issues on linux