Support building with new libavcodec versions.

CODEC_ID_* has been replaced with AV_CODEC_ID_* upstream.