Can't stop execution of "ADD PERIOD"
You need dynamic SQL for DDL like this.
IF NOT EXISTS(SELECT 1 FROM sys.periods WHERE object_id = OBJECT_ID('sysjobhistory'))
DECLARE @sql NVARCHAR(MAX) = N''
SET @sql += N'
ALTER TABLE dbo.sysjobhistory
ADD PERIOD FOR SYSTEM_TIME (StartTime, EndTime);'
EXEC sys.sp_executesql @sql
Statement processing happens in several consecutive phases. Fist comes parsing, then binding, then optimization and finally execution.
I suspect your problem originates at the binding phase. Here SQL Server maps tokens from the statement to objects in the database. Since it finds existing objects for the ones it is trying to create it throws and error. Why the development team chose to implement this branch of ALTER TABLE in binding rather than execution only they can say.
The solution, as Erik says, is to use dynamic SQL. This creates a new "inner" batch which is only submitted for processing during the execution phase of the "outer" batch. Hence the checks are sure to pass (absent concurrent changes).