Fixed some errors when compiling with Sun Studio