Don't use function dim_vector::to_jit. It was thought to be used exclusively by
the JIT compiler and it is removed now.

--- ./src/connectivity.h.orig	2020-02-02 14:20:08.000000000 +0100
+++ ./src/connectivity.h	2021-08-11 14:26:19.706581028 +0200
@@ -153,8 +153,7 @@ octave::image::connectivity::set_padding
   const Array<octave_idx_type> lengths = padding_lengths (size, padded_size);
   const octave_idx_type* lengths_v = lengths.fortran_vec ();
 
-  const octave_idx_type* strides_v = size.to_jit ();
-  const octave_idx_type row_stride = strides_v[0];
+  const octave_idx_type row_stride = size.xelem (0);
 
   std::function<void(const octave_idx_type)> fill;
   fill = [&] (const octave_idx_type dim) -> void
@@ -165,7 +164,7 @@ octave::image::connectivity::set_padding
     if (dim == 0)
       im_v += row_stride;
     else
-      for (octave_idx_type i = 0; i < strides_v[dim]; i++)
+      for (octave_idx_type i = 0; i < size.xelem (dim); i++)
         fill (dim -1);
 
     for (octave_idx_type i = 0; i < lengths_v[dim]; i++, im_v++)

--- ./src/imreconstruct.cc.orig	2020-02-02 14:20:08.000000000 +0100
+++ ./src/imreconstruct.cc	2021-08-11 14:31:36.450682736 +0200
@@ -110,10 +110,6 @@ scan_raster_order (T& padded_marker, con
 
   const octave_idx_type n_neighbours = raster_neighbours.numel ();
 
-  // We probably should not be using this but converting to Array
-  // just to have fortran_vec seems a bit too much.
-  const octave_idx_type* s = original_size.to_jit ();
-
   std::function<void(const octave_idx_type)> scan;
   scan = [&] (const octave_idx_type dim) -> void
   {
@@ -122,7 +118,7 @@ scan_raster_order (T& padded_marker, con
 
     if (dim == 0)
       {
-        for (octave_idx_type k = 0; k < s[0]; k++, J++, I++)
+        for (octave_idx_type k = 0; k < original_size.xelem (0); k++, J++, I++)
           {
             for (octave_idx_type i = 0; i < n_neighbours; i++)
               if (*J < J[neighbours[i]])
@@ -133,7 +129,7 @@ scan_raster_order (T& padded_marker, con
           }
       }
     else
-      for (octave_idx_type i = 0; i < s[dim]; i++)
+      for (octave_idx_type i = 0; i < original_size.xelem (dim); i++)
         scan (dim-1);
 
     J += pads[dim];
@@ -161,10 +157,6 @@ scan_antiraster_order (T& padded_marker,
 
   const octave_idx_type n_neighbours = antiraster_neighbours.numel ();
 
-  // We probably should not be using this but converting to Array
-  // just to have fortran_vec seems a bit too much.
-  const octave_idx_type* s = original_size.to_jit ();
-
   J += padded_marker.numel () -1;
   I += padded_marker.numel () -1;
 
@@ -178,7 +170,7 @@ scan_antiraster_order (T& padded_marker,
 
     if (dim == 0)
       {
-        for (octave_idx_type k = 0; k < s[0]; k++, J--, I--, ind--)
+        for (octave_idx_type k = 0; k < original_size.xelem (0); k++, J--, I--, ind--)
           {
             for (octave_idx_type i = 0; i < n_neighbours; i++)
               if (*J < J[neighbours[i]])
@@ -193,7 +185,7 @@ scan_antiraster_order (T& padded_marker,
           }
       }
     else
-      for (octave_idx_type i = 0; i < s[dim]; i++)
+      for (octave_idx_type i = 0; i < original_size.xelem (dim); i++)
         scan (dim-1);
 
     J   -= pads[dim];

--- ./src/bwconncomp.cc.orig	2020-02-02 14:20:08.000000000 +0100
+++ ./src/bwconncomp.cc	2021-08-11 14:41:35.249619414 +0200
@@ -81,13 +81,11 @@ connected_components (const boolNDArray&
 
   const dim_vector original_size = BW.dims ();
   const dim_vector padded_size = BW_pad.dims ();
-  const octave_idx_type* o = original_size.to_jit ();
-  const octave_idx_type* p = padded_size.to_jit ();
   const octave_idx_type ndims_m1 = BW_pad.ndims () -1;
 
   std::vector<bool> dim_padded (BW_pad.ndims (), true);
   for (octave_idx_type i = 0; i < BW_pad.ndims (); i++)
-    if (p[i] == o[i])
+    if (padded_size.xelem (i) == original_size.xelem (i))
       dim_padded[i] = false;
 
   for (std::vector<octave_idx_type>& conn_comp : all_components)
@@ -100,21 +98,21 @@ connected_components (const boolNDArray&
             {
               if (dim_padded[d])
                 {
-                  ind  += mult * (offset % p[d] - 1);
-                  mult *= p[d] - 2;
-                  offset /= p[d];
+                  ind  += mult * (offset % padded_size.xelem (d) - 1);
+                  mult *= padded_size.xelem (d) - 2;
+                  offset /= padded_size.xelem (d);
                 }
               else
                 {
-                  ind  += mult * (offset % p[d]);
-                  mult *= p[d];
-                  offset /= p[d];
+                  ind  += mult * (offset % padded_size.xelem (d));
+                  mult *= padded_size.xelem (d);
+                  offset /= padded_size.xelem (d);
                 }
             }
           if (dim_padded[ndims_m1])
-            ind  += mult * (offset % p[ndims_m1] - 1);
+            ind  += mult * (offset % padded_size.xelem (ndims_m1) - 1);
           else
-            ind  += mult * (offset % p[ndims_m1]);
+            ind  += mult * (offset % padded_size.xelem (ndims_m1));
 
           offset = ind;
         }

