Get rid of all warnings and errors on Windows.

This increases msvc compatibility.
prop2 is not necessarily zero-terminated afterwards.