Modified some tests to work with MSVC.

All the tests would compile on MSVC. But we should merge #390 and #391 to clear the errors.
This covers #386 as well.