imgproc: fix compiler error for gcc 4.8

this bug was introduced in a73809e6.