Minor changes to support older ffmpeg on distros like Ubuntu 12.04