In some systems missing opencv.pc file for pkg_config. There is example for OpenCV 2.4, you can copy it to /usr/share/pkgconfig
Fixed some compatibility issues