CMake adaptation for any version of OpenCV

Now we can pass OpenCV version using -DOpenCV_VERSION=xxx being xxx the
version. If no OpenCV_VERSION is specified, it'll assume default 246
version.