Support 1.9+

Support 1.9+ and fix some problems (related to 'rake && rake test')