Fix build error on Windows

double vs int warning on MSVC. From Phylroy.