Fixed some stuff related to native compiling with VC9