replace -ffast-math with explicit optimizations

gcc usualy does the right thing with -ffast-math but
better be sure and enable only the safe optimizations.