Fixed OME to APNG translation

In addition to checking if the time increment is null, it's checked for
NaN and infinity before trying to parse it to a short.