[issue #4] Added asShared() to ServiceDefinition.