A simple function to calculate the viewport in ems. Useful for matching media queries in javascript without matchMedia