Avoid "cast discards const qualifier from pointer target type" error from GCC.