add swtich between OpenCV 2.4 and OpenCV 2.9