configure: Move log2 dependency declaration to a place it takes effect

It was incorrectly moved in c869fcdeac3b7cd71a852b928902daadeca55685.
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  configure: Move log2 dependency declaration to a place it takes effect

Merged-by: Michael Niedermayer <michaelni@gmx.at>
sonic: use M_SQRT2
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/sonic: fix memleaks

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>