use proper c++ style casting

not sure how I could have overlooked that.
Apparently MSVC++ allows this construct.