Check if history.pushState is available to use pathname env