[cs] remove untyped code from Math, inline isNaN and isFinite