Safer behavior for tree-node context menus (tested in Safari)
Proper detection of right-clicks on OS X

Now matches on ctrl-click, double-tap in OSX browsers. Tested on Safari, Chrome, and Firefox.

(If this provies unreliable, consider using newer jQuery event 'contextmenu' instead.)