Replace deprecated undefined date component

NSDateComponentUndefined is actually deprecated in iOS 8 but has been introduced in iOS 7, so these changes are still backward compatible and remove a few warnings on iOS 8.