[bootstrap] change mkmf.rb to generate stable Makefiles

The Makefiles need to be identical from build to build in order to
prevent unneeded rebuilds in OBS. In particular, the ordering of
object files on the linker command line has to be stable to get
reproducible builds.
[ruby] change mkmf.rb to generate stable Makefiles

Make the same change in the non-bootstrap version, because making it in the bootstrap
version didn't seem to help. Perhaps miniruby is running with the libs from ruby 1.9?
Odd.