Improved VapourSynth detection code.