Fix compilation errors on modern compilers.