Fixing OSX 10.8+ builds. Note that the new API has different memory management characteristics, hence the retain.