do not use Number.isNaN if not available