Vcd fix

Hi,

This should fix vcd detection on mingw-w64, along with a cast warning fix.
MSDN says to use intptr_t.

Changes OK?