Expose `globals` option from `with` module

fixes #1452