compat/win32/syslog: fix use-after-realloc