Fix check for jpeg_mem_ to work with libjpeg-turbo

ioq3 does not really depend on the v8 libjpeg API except for the jpeg_mem_* functions. Those are present with e.g. libjpeg-turbo (v6 API) as well.

Related Gentoo issue https://bugs.gentoo.org/show_bug.cgi?id=479502#c6