added support for shared contexts in cocoa (it was working magically until now)