configure: use pkg-config helpers

This makes existing pkg-config uses as well as the libsdl checks
use the new pkg-config helper functions, which should be more
robust against broken systems.

Signed-off-by: Mans Rullgard <mans@mansr.com>
