Add C++0x flag and fix errors resulting.
Merge branch 'c++0x-compat'