Fix compiler warning regarding discarding const qualification.