configure: fix FAAD linking test (-lm) and clean up

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>