[libc++] Refactor num_get optimization to not be ABI breaking (#121690)