[win] Fix more warnings on windows

This leaves us with around 22 warnings[1]. Most of them are probably safe to ignore  (like e.g. [4996] http://msdn.microsoft.com/en-us/library/aa985974.aspx ). 

[1] http://cdash.0xdeadbabe.info/buildSummary.php?buildid=112