Use C++ static_cast (refs #168)