configure: rewrote the detection for WebP image library
Unfortunately, the detection was broken because the header is using a hack
on the function name to provide compatibility between different versions of
the API, which means the usual link test, which uses a known name of a
symbol, cannot work without also using the header to get the hack applied
on the function's name.
The new detection mechanism now simply check for both header and link at
the same time, so we're probably safe until a Major API change is decided,
in which case we will also have to update WRaster's code anyway.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>