Fixing a -Wcast-qual warning in GCC. No functional changes.