Win7 x64 compilation fixes

Changes for being able to compile with Atmel Studio 6.1 + Yagarto
toolchain on Win7 x64