Add support for compiling with c++11.
Merge pull request #44 from upthere/c++11-support

Add support for compiling with -std=c++11.