Examples: update replaceState polyfill to work with anchors

This avoids a problem on old browsers when the page URL 
stores the volume / page in the fragment rather than either
the path or query string which normally doesn’t trigger 
navigation when the user clicks on a link which is otherwise
the same URL.