Fix issue where Router throws when calling `replace()` and not `html5`

Fixes #739