fix link error in debug build when BT_THREADSAFE not defined