tests: fix build when --enable-tests --enable-tests-gles --enable-capi is not enabled.

Fix build when --enable-tests --enable-tests-gles --enable-capi is not enabled.
Fix build when --enable-tests-gles --disable-x11 is not enabled.
Enable decodecapi at render mode 2/3/4