compile script: added -O2 as a default