Fixed Win32 compatibility, basing on mainland's fork ( https://github.com/mainland/cuda/commit/a3c4410e8225e5c914e8ad0a30bb6ca92187e55c )