Fix segmentation grabcut for MSVC

Trying to fix MSVC issues with grabcut