Log messages from reports promises to event log on Windows.

Use portable LogToSystemLog function to that end.

Fixes Redmine #6315
@kacfengine @ediosyncratic  Regarding using C99 Variable-Length arrays, they are not to be used /everywhere/. Especially when the length is possible to be altered by user input and has no upper boundary, VLAs are a big danger since they can lead to security-dangerous segfaults.

This particular case I think is good because IIRC a Log message is bound to some maximum size.