Fix building with C++ objects, variable names were inconsistent.