fix compilation error with GCC 4.8
fix compilation on OpenCV 2.4