Improve viewportW/viewportH calculations based on https://github.com/ryanve/response.js/issues/17