I use my own implementation to draw rectangles on image, so taht there will not be problem on older version of matlab