check for and remove -ansi flag, because it interferes with C++11