Don't set tracing hooks until tracing has started (bug 1049248). r=fitzgen