Fix build on SunOS
Merge branch 'joyent/feature/miscfix/2013Q1' into joyent/release/2013Q1