Use static_cast<>() instead of reinterpret_cast<>()

I thought I was getting compiler errors from this. Maybe there was also a
different problem at the time?