fixing dependencies

As discussed here: http://code.opencv.org/issues/3923