Improve ios8 support

@krukow I want to get this into CI and I think I need to make some changes.