Fix build against cv < 2.4.0