hack a shaky user agent.

This is definitely not finished, and is awful. There's probably a few
debug things I left in by accident, but we can sort those out fairly
trivially.