Fix release build on Solaris.
Fix build on Ubuntu 14.10.