osx_write: Be careful when dereferencing the private_data pointer.