Fix Enumerable#inject to return nil when the result is undefined