Try to fix builds where either Xv or D3D are enabled.