better cross-browser autoResize