Modified map.c to fix some MSVC10 compilation errors.