configure: fix libxavs check

libxavs may require pthreads and libm at link time, and without
said ldflags available as global extralibs, the check will fail.

Regression since 6dfcbd80ad446ff163b47f2bf432bbf706436ea8.

Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
