Fixed Broken #ifdef and compile error

compile error could me due to osx 10.6