replace deprecated finite() with isfinite()

finite() is deprecated. Replace with isfinite() as per http://refspecs.linuxfoundation.org/LSB_3.2.0/LSB-Core-generic/LSB-Core-generic/baselib-finite.html