xrdpapi: cast fix