Added in -std=c++0x in d directory, since some compilers complain.

We are now using some basic c++11 features in M2, e.g. auto,
type_traits.