added preprocessor directives to remove 10.8 dependent features when compiling on 10.7.