Fix crash on GDNative API json generator exit.
Fix crash on GDNative API json generator exit.

(cherry picked from commit a4423c82f87ad0eaa9ffc3842407d003321ac22d)

ex/godot,ex/godot,ex/godot,ex/godot,ex/godot,ex/godot,ex/godot,ex/godot