Return consistent type for integral values and be 2.6 compatible