Add missing <algorithm> headers so it compiles on the CUDA 5.5 system