Avoid touching the `window` object in case it is not defined.

This makes the ember-data usable in node.js again.