Various MSVC fixes
Remove ranges from switch/case statements
Remove unnecessary include of unistd.h