add optimization to config.sh

If we're going to hardcode the cflags,
we should add optimization. otherwise,
the template stuff like std::vector::push_back
becomes super-slow.