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.