remove unneeded EMIT_GENERATED_FUNCTIONS
run js optimizer only in -O2+