Absolutely continuous invariant measures for a class of meromorphic functions