Update view.js

Checks if `require.toUrl` exists as it is [not included in RequireJS' almond](https://github.com/jrburke/almond#restrictions). It shouldn't be needed in production builds, anyway.