BUG: fix buffer dtype mismatch on win-amd64

ValueError: Buffer dtype mismatch, expected 'Py_ssize_t' but got 'long'
Merge pull request #4194 from cgohlke/patch-2

BUG: fix buffer dtype mismatch on win-amd64