fix some link errors in msvc