allow custom env keys in an embedded hash

Another approach to #310.