Fix MSVC build

Note: The unit test is technically incorrect for all platforms but passes due to implicit casting