Incorporated changes found on MacOSX 10.8 / gcc 4.2