BUG: segmentation fault when unwrapping 3d image

Unwrapping a 3D image using unwrap_phase no longer causes a segmentation
fault when the wrap_around parameter is True for the middle dimension.