Fix for newer versions of gcc (e.g., on Ubuntu 12), see http://stackoverflow.com/questions/12644922