support older ruby than 1.9.2