OpenCV: support for --head install.

Closes #848.