Make the casting work on Windows too.

Fixes CppunitTest_starmath_qa_cppunit on Windows.

Change-Id: I3fd73db1ebb70ac19f99bc3e337b1a8107486ae7