MIPS: fix NaN handling of Isolate::StackOverflow()

The mjsunit/stack-traces-overflow.js test fails on MIPS target as
Error.stackTraceLimit = NaN; should disable stack trace messages and
Isolate::StackOverflow() assumes static_cast<int>(double NaN) < 0.

MIPS has a different NaN representation than other architectures so
the NaN value casted to int is positive. This patch adds an isnan()
check to make the handling of NaN uniform on all architectures.