Fix build on OpenSolaris.

With these changes, dmd compiles on OpenSolaris 11.1.
Merge pull request #3512 from redstar/solaris

Fix build on OpenSolaris.