Backport May 2013 security patches from 4.0 versions
Update build toolchain
Clearing the Mason cache is necessary
Bump version
Merge branch 'security'