Document `globals` option

See #1222, #1223, #1689, & #1715.

Apply @ForbesLindesay's #1223 to master.