Replace deprecated Carbon APIs with Cocoa. Includes code by: Simone Karin Lehmann Michael Natterer Daniel Sabo (cherry picked from commit e5634429)
mentioned in issue #423