Add encoding for older rubies.