I re-committed as r33285 because
* Ruby should not keep it platform dependent with default compile
flags [ruby-core:39566], [ruby-core:28212]
* this commit has corresponding test [rubyspec:a9525edcd]

Before reverting a commit, please give an example of a problem it can
cause or provide a failing test.

It a commit doesn't address all the possible scenarios, please re-open
the issue so additional patches can be made.