Add c++ algorithm header file
In Ubuntu 12.04, without including c++ algorithm header file, compile error returned while AG is building.