Added dependency on msvcrt and changes snprintf and stat calls to their _-conterparts in order to make ghci work.