Use isfinite() instead of finite().

finite() was from BSD days, isfinite() is the standard now.