fix errors preventing vc++ build