Fix double 'popstate' fire in Safari8.