only use -std=c++0x flag on g++
fixed warning C4018: '<' : signed/unsigned mismatch on MSVC