Add linenoise lock helpers to rustrt.def.in.