Provide a replacement InterlockedAdd on msvc.

This commit licensed as MIT/X11.
Set _WINNT_WINVER to 0x502 (vista).

This is needed to get various Interlocked functions in msvc.

This commit licensed as MIT/X11.