Windows fixes

Here are some changes that I made to get windows MSVC working better. Note that some of the changes to wbImport.cpp are real bug fixes that could fix problems on other platforms as well.