Fix to_date as in jruby/jruby#740.