fix compilation errors on linux and windows