Fix ruby engine detection under 1.8