fix build against opencv<2.4