Added ISNAN macro for windows compat.