Add if not defined around sinatra gem

Prior to this commit we did not always work with and class
that also defined the sinatra gem as the package this commit
wraps and if not defined conditional