I think you can just use `pj_strdup2` here.