Try installing OpenCV 2.4 from a 3rd party PPA

Unit tests fail with OpenCV 2.3.