Call ready() if document already loaded

Just realized you could call pubnub.ready() directly, however this change makes it so you don't have to if the document is already loaded.