Changes to be able to compile on MacOSX 10.6.