Fix msvc compile errors (issue #230)