Resize the zoom box width to fit the content

This patch attempts to address #2306 (and [bug 771921](https://bugzilla.mozilla.org/show_bug.cgi?id=771921)).