check if pushstate is supported before using it.