fix build error on ocv 2.4 branch