Add option to disable sharing

Fixes #498

Signed-off-by: Michal Čihař <michal@cihar.com>