Changes to work with Thrust 1.7