Convert category methods to standalone functions to avoid need for -ObjC linker flag in iOS