attach window resize handlers in a way that doesn't overwrite previous handler