Several fixes in the DefineHistograms method needed for compilation

No match.