Don't make PROGRAM-ID attribute compulsory.

Assign an id of -1 by default.

Fixes #11644
(cherry picked from commit 53fb605090e2225b82f6826e26c08f26261eaeb1)