Fix build script to only do simple optimizations if specifically asked

Because it messes with the namespace and constants.