Minor changes to support iOS 6 while keeping the API intact