Fix some compilation errors on linux