ui.backend.cocoa.views: simplify and add os version check.