Add some const-ness for C++ compatibility.