avisynth: Cast to the right type when loading avisynth library functions