Fixes for pinba-extension on threads