[perl #120544] fix "goto" around var init error in av_extend_guts

This fixes a Win32 Visual C 6 in C++ mode syntax error. See #120544 for
the details.