Using builder flags

diff --git a/ruby/ext/google/protobuf_c/extconf.rb b/ruby/ext/google/protobuf_c/extconf.rb
index b7c439b..0bbc15c 100755
--- a/ruby/ext/google/protobuf_c/extconf.rb
+++ b/ruby/ext/google/protobuf_c/extconf.rb
@@ -7,9 +7,9 @@ ext_name = "google/protobuf_c"
 dir_config(ext_name)
 
 if RUBY_PLATFORM =~ /darwin/ || RUBY_PLATFORM =~ /linux/ || RUBY_PLATFORM =~ /freebsd/
-  $CFLAGS += " -std=gnu99 -O3 -DNDEBUG -fvisibility=hidden -Wall -Wsign-compare -Wno-declaration-after-statement"
+  $CFLAGS += " -std=gnu99 -DNDEBUG -fvisibility=hidden -Wall -Wsign-compare -Wno-declaration-after-statement"
 else
-  $CFLAGS += " -std=gnu99 -O3 -DNDEBUG"
+  $CFLAGS += " -std=gnu99 -DNDEBUG"
 end
 
 if RUBY_PLATFORM =~ /linux/
