lib/re: prevent allocating `native_match` only to free it

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>