Fix some compilation problems with ffmpeg 2.2