Fix compilation errors on GCC