fix to work with later releases of libav