Remove -stdlib=libstdc++ flags as they cause problems with gfortran.