The realization problem for finitely generated refinement monoids