Update darnit/api/darnit_main.c

Fixed crash when exiting on windows with libdarnit compiled using O3 flag