fix js_optimizer.py decision when to use the native optimizer