Fixed unit test bug for OpenCV < 2.4