Fix compilation on OpenSolaris 11.

With these changes, druntime can be compiled on OpenSolaris 11 and the unit tests can be run.
Most of tests passes.