Check redirect URL is unmodified.

Only use the HTML5 history API if the redirect URL is unmodified.

Closes #4