Handle parameter being string in way that works on ruby 1.8.7 and 1.9.3