opencv: Fix build error on macOS

The build fails on macos with the following error:
/usr/local/Cellar/opencv/4.5.0_5/include/opencv4/opencv2/core/mat.hpp:2226:15: error: no template named 'initializer_list' in namespace 'std'
      Mat_(std::initializer_list<_Tp> values);
fatal error: too many errors emitted, stopping now [-ferror-limit=]
 35 warnings and 20 errors generated.

Part-of: <gstreamer/gst-plugins-bad!2386>
29 jobs for !2386 with backport-mr-2368-into-1.18-fix-macos-opencv in 34 minutes and 46 seconds (queued for 7 seconds)
detached
Status Name Job ID Coverage
  Build Docker
passed alpine amd64 manifest builder docker #11621721

00:00:51

passed android docker #11621720

00:00:27

passed cerbero fedora amd64 docker #11621719

00:00:28

passed fedora amd64 docker #11621718

00:00:51

passed gst-indent amd64 docker #11621722

00:00:28

 
  Preparation
passed gst indent #11621724

00:00:12

passed manifest #11621723

00:00:51

 
  Build
passed build cerbero cross-android universal #11621733
gstreamer

00:09:45

passed build cerbero cross-ios universal #11621737
gst-ios-14.3

00:28:59

passed build cerbero cross win32 #11621734
gstreamer

00:08:53

passed build cerbero cross win64 #11621735
gstreamer

00:09:44

passed build cerbero fedora x86_64 #11621732
gstreamer

00:08:55

passed build cerbero macos x86_64 #11621736
gst-macos-11.1

00:16:20

passed build clang fedora x86_64 #11621728

00:04:53

manual build msys2 #11621731
docker windows 1809 allowed to fail manual
passed build nodebug fedora x86_64 #11621725

00:15:47

passed build static fedora x86_64 #11621726

00:17:57

passed build static nodebug fedora x86_64 #11621727

00:15:47

passed build vs2017 amd64 #11621729
docker windows 1809

00:19:37

passed build vs2017 x86 #11621730
docker windows 1809

00:17:54

 
  Test
passed check fedora #11621738
gstreamer

00:09:55

passed integration testsuites fedora 1/4 #11621739
gstreamer

00:10:35

passed integration testsuites fedora 2/4 #11621740
gstreamer

00:09:24

passed integration testsuites fedora 3/4 #11621741
gstreamer

00:07:46

passed integration testsuites fedora 4/4 #11621742
gstreamer

00:06:26

passed valgrind bad #11621743
gstreamer

00:06:17

 
  Integrate
passed cross-android universal examples #11621744

00:11:09

passed cross-ios universal examples #11621746
gst-ios-14.3

00:04:02

passed documentation #11621745

00:12:20