Check if document is already ready

If the browser is really fast the document may have
already loaded by the time we add our event handler, so it is never
called. This way it should be called either way.

fixes xlexi/alientube#51