Update locationManager method compatible with iOS 5 and iOS 6