Don't override sum if ActiveSupport is defined.
Make variance work on empty arrays.