Fixed cases where 32-bit and 64-bit jvm is used with the same cache dir.
Fixes for compilation with visual studio.