Autodetect C++11 features and adjust accordingly

Uses boost macros to figure out which features are present.