Use isnanf() instead of isnan(). Avoids a link error on HP-UX 11.