Make the code compileable on OpenCV 2.4.10