Warning fixes for VC++, contributed by Morten Ofstad!