Merge branch 'master' into 'c++11'

Users on OS X 10.9 (Mavericks) are unable to build the master branch. The C++11 branch works fine, so it would be nice to get the latest changes on that branch as well.