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

It was incorrectly moved in c869fcdeac3b7cd71a852b928902daadeca55685.