the thread_attachX functions already set this

- also fixes OSX memory leak