Only trigger onpopstate event if it's triggered explicitly

When the document is loaded, onpopstate might be triggered, but `event.state` is `null` then.
When triggered by the browser arrows, it is not.
Merge pull request #3 from TimBeyer/fix-initial-inpopstate

Only trigger onpopstate event if it's triggered explicitly