Add version checks to previous modifications to ffmpeg_cap_impl.hpp

Add version checks around uses of AVCodecID and av_opt_set, since these aren't
defined for older versions of ffmpeg.