Fix bug when unit root models provide NaN's or Inf's in g_omega

(cherry picked from commit b33da9a40d1effc708661c12bf3a3077878ad332)
Merge pull request #604 from rattoma/4.4

HP-filtered moments: Fix bug when unit root models provide NaN's or Inf's in g_omega