Compatibility fix for ruby versions <2.1.