Fixed Win32 string conversion.

Specifying -1 as the source string size makes the returned size include
the null terminator.

Closes #364.