compile with o2 optimizations by default