Re #1458 - the cast is back, but cast to different type depending on platform. Gtest modernized.