Disable plugins in safe mode

Fixes #820