added #ifdef for MacOS 10.6.8