Fixed the compilation errors in mod.cu

The generated mod.cu contains a number of `std::min` and `std::max`. `#including <algorithm>` will remove the not-found errors from these two functions.