configure: do not default to system libjpeg on Linux

There are multiple different sonames of libjpeg in different distros,
so use a system one only when system libs are requested.

Change-Id: I164433a31ab0fb4723da6843eb1f1132c8447d9e
(cherry picked from commit 20d1e20d16ac377c160d47b53ff487a75fbd166f)