Compile fix

Fixed C++ casting for VS2013