Add include<algorithm> to compile on Linux