Fix compilation errors in unit tests for VC