Make numeric type dispatch more portable (and probably slightly more efficient)