Standalone port of Google Closure's NumberFormat