Replaced C cast to long with a static_cast<const void*>() to avoid a build error under Mingw 64.