MSVC10 needed some slight adjustments to map.c to compile