msvcirt: Fix implementation of streambuf::sync.