Add __host__ __device__ to compare_first's constructor.