add window() to get cropped image info; a lame attempt to make it work with
 commonjs and <script>