Support window event delegate on Cocoa platform