Attempt a better base_url auto-detection