One more attempt at getting this working on Ruby 1.8 et al.