Added custom round function.

This pull request hopefully eliminates the compile problems on solaris.