link with nvcuvenc and ffmpeg libraries only if WITH_NVCUVID is enabled

This should fix http://code.opencv.org/issues/2939