Switch to intents for linking by uid.

Fixes #47.