add a workaround for Ruby before 2.1