Get an attribute (property) from a JavaScript object. Fails if the
attribute is undefined.
Note that this predicate conflicts with SWI-Prolog get_attr/3
to get attributes from a variable. For this reason we also make this
predicate available as get_attribute/3.