Fix #510 compile error on ios