add alternate substitution logic for Opal environment

- also qualify top-level constants
Merge pull request #834 from mojavelinux/opal-subs

add alternate substitution logic for Opal environment