Added support for Google's thread sanitiser in gcc 4.8.