iOS: fix crash from overrelease in UIImageToMat
Merge pull request #3340 from AdLantis:2.4