[win32] improve cast of arg 3 to CryptGenRandom to BYTE*

ChangeLog for the windows mingw fixes.
Closes #1156