Fix test failes in 1.8.7 and jruby (1.8.7 mode)

http://osc.matsukei.net/issues/410 refs #410