(PUP-753) Use correct format constant on 1.8.7

The constant for the default format string changed between 1.8.7 and
1.9.3. This adds a check for the ruby version so that it can get the
correct constant.