I ended up using pj_cstr (initialises a const pj_str_t with a const char*).