check if OC.Share is defined - fixes #12