Fix compile error on ios6.