Fix va_list usage, or it will not work the right way on Windows

These are issues not yet fixed to win32 build.

`types_count` is the last parameter before `...`, not `types_length`