fixed compile errors on Linux with gcc