Add workaround for missing RETURN_SIZED_ENUMERATOR macro in Ruby < 2.0.
Add include <math.h>. It defines isnan() and isinf().