opencv: define CASCADE_DO_CANNY_PRUNING for opencv < 4

3 jobs for master in 8 minutes and 9 seconds (queued for 13 minutes and 8 seconds)