task: Add thread name support on OS X and iOS