Fix backwards compatibility with iOS4