handle Ember.Metrics.layoutOf(window) and Ember.Metrics.layoutOf(document)

TODO: shim older browsers to support layoutOf(document) better