Fix warning: "const type qualifier on return type has no effect".

This was detected by Clang when compiling with `-Wextra`.