MeanRealType: do not hardcode DoubleType for sum
MeanRealType: add hack for javac compiler support