Fix build on configurations without fast av_log2()