Fix compile error on mac python 2.7