Fix 'const type qualifier' warnings on GCC -Wextra

Makes the GCC's -Wextra output silent hopefully.
There might be more warnings when compiling with clang.