Fix compilation errors detected with gcc