Fix iOS 8 nth-child bug