This doesn't seem to be the right thing to do on ruby >= 1.9, but I'm not sure what is.