More reliable iframe.onload polyfill