[runtime] Avoid using tls in the monitor wrappers if its not available.