fix compatability with ruby < 2.1