Fix ffmpeg compilation issues on Ubuntu 12.04.