Fixing compatability issues with 1.8.7
Fixed all isues with rakefile and ruby 1.8.7