OpenCV 3 (trunk) compatibility