cocoa: use non-deprecated APIs in filechooser code