Work around Safari dropping URL fragment when redirecting