fix build on Solaris 10 and close issue #9