Use extended attributes to define which interfaces are globals (fixes #1053).

This makes our approach consistent with Gecko's.