Adds window resizing event handler