Fix require.ready() to check for document ready state.