Apply same fix as http://root.cern.ch/gitweb?p=root.git;a=commitdiff;h=31cf56063d2b5a188888bb6eed244006df4fa87d
for 2D histograms. This fixes ROOT-5900