Only use replaceState if actually available