Corrects isNaN global to coerce to number value. Fixes #652