Setup resize event after dom ist loaded, debounce.

The debouncing is necessary for IE8, which fires additional resize
events as a result of autoscaling and ends up in an infinite loop.