I'm not fond of this hack to support pandas <= 0.12.  This will keep older pandas versions working as well as previously, though.