Rewrote some OSX code that had used an obj-C block, to keep the old 10.5 compilers happy.