Correct popstate history re-write logic

Errors were occuring when using the slider with the popstate function, besauce event.OriginalEvent.state was null, which was erroring as it doesn't have a properly 'style'.

Add an additional check to confirm object exists before checking it's contents.

Works with remove-graph, back-button usecase, and slider resizing.
Merge pull request #68 from anchor/popstate

Correct popstate history re-write logic