Handle onload correctly and trigger the load event for <script>.

Without this, facebook.com pages (with their custom module loading system and React.js) silently fail to make progress loading content, forever waiting on load events on the initial set of `<script>` elements.