Add basic threaded runtime support.