Fixed/Modified the earlier patch for CRM-12695 wrt comment on PR - 1135

----------------------------------------
* CRM-12695: Membership sharing doesn't work after merge
  http://issues.civicrm.org/jira/browse/CRM-12695
* CRM-12695-fixes:
  http://issues.civicrm.org/jira/browse/CRM-12695-fixes
Merge pull request #1177 from aadityawalawalkar/CRM-12695-fixes

Fixed/Modified the earlier patch for CRM-12695 wrt comment on PR - 1135