Make Boost.Test work with RTTI disabled (fixes #9228)