add another guard condition for ruby-1.8.7 to prevent warnings

stop warnings on ruby-1.8.7