Add a missing const_cast for Windows.