CLIENTLIBS-14 Ruby 2.1 compatibility, workaround ruby bug #9718