fix compile errors on Linux