Use NSTextAlignmentCenter in place of UITextAlignmentCenter for iOS6 and later.