Implement system-level profiles. Fixes #981.