Fix for #247, breaks 'no initial pjax:popstate event'