FIX: Updated encoding for Ruby versions lower than 2.x