Make Boost.Variant work on exception-disabled environments (refs #8717)